<template>
	<view class="actDetail" v-html="datas.detail">
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:"",
				datas:{},
			};
		},
		onLoad(e) {
			this.id = e.id;
			this.initData();
		},
		onShareAppMessage() {
			return{
				title:'洗匣士~您的家居窗帘清洗助手',
				path:'/pages/home?spreadId=' + (uni.getStorageSync('userId')?uni.getStorageSync('userId'):''),
				imageUrl:getApp().globalData.imgDomain+'public/logo.png',
				desc:'手机下单 | 专员取送 | 生态环保 | 轻奢洗护',
			}
		},
		onShareTimeline() {
			return{
				title:'洗匣士~您的家居窗帘清洗助手',
				path:'/pages/home?spreadId=' + (uni.getStorageSync('userId')?uni.getStorageSync('userId'):''),
				imageUrl:getApp().globalData.imgDomain+'public/logo.png',
				desc:'手机下单 | 专员取送 | 生态环保 | 轻奢洗护',
			}
		},
		methods:{
			initData(){
				this.tool.getData('Regist/problemInfo',{
					id:this.id
				}).then(res=>{
					console.log(res);
					if(res){
						this.datas = res;
						uni.setNavigationBarTitle({
							title:res.title,
						})
					}
				}).catch(err=>{
					console.log(err);
				})
			},
			/* 
			 const reg = new RegExp('<img', 'gi');
			 res.content = res.content.replace(reg, `<img style="width: 100%!important;"`);
			 */
		}
	}
</script>

<style lang="scss">
	page{
		background: white;
	}
	.actDetail{
		width: 100%;
		padding: 12px 4%;
		box-sizing: border-box;
	}
</style>
